package ownserver;


import java.io.Serializable;

import base.Turret;

import com.sun.sgs.app.ManagedObject;
import com.sun.sgs.app.ManagedReference;

public class ServerTurret extends Turret implements ManagedObject, Serializable {
	private static final long serialVersionUID = 1L;
	
	/**
	 * 
	 * @param shipRef
	 * @param begin
	 * @param end
	 * @param x
	 * @param y
	 * @param optimal
	 * @param cycleDuration
	 * @param baseDamage
	 * @param tracking
	 * @param signatureRadius
	 * @param falloff falloff of the turret. damage model might handle falloffs of <1.0 strangely
	 */
	public ServerTurret(ManagedReference<ServerShip> shipRef, double begin, double end, double x, double y, double optimal, 
			int cycleDuration, double baseDamage, double tracking, double signatureRadius, double falloff)
	{
		super(null, begin, end, x, y, optimal, cycleDuration, baseDamage, tracking, signatureRadius, falloff);
		this.shipRef = shipRef;
	}
	
	private ManagedReference<ServerShip> shipRef = null;
	
	public ServerShip getShip()
	{
		return shipRef.get();
	}
}
